from backend.models.base import BaseModel
from backend.database import db

class Script(BaseModel):
    __tablename__ = 'scripts'
    
    name = db.Column(db.String(200), nullable=False)
    description = db.Column(db.Text)
    content = db.Column(db.Text, nullable=False)
    language = db.Column(db.String(50), default='python')  # python, java, shell, etc.
    created_by = db.Column(db.String(100))
    is_public = db.Column(db.Boolean, default=False)
    version = db.Column(db.Integer, default=1)